﻿using System;
using System.IO;
using System.Xml;

namespace WebMonitoring
{
    public static class FileUtility
    {
        public static bool WriteLine(String filepath, String message, bool append)
        {
            StreamWriter targetFile = new StreamWriter(filepath, append, System.Text.Encoding.UTF8);
            targetFile.WriteLine(message);
            targetFile.Close();
            return true;
        }

        public static bool Write(String filepath, String message, bool append)
        {
            StreamWriter targetFile = new StreamWriter(filepath, append, System.Text.Encoding.UTF8);
            targetFile.Write(message);
            targetFile.Close();
            return true;
        }
    }
}
